Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(true, X) → mark(X)
a__and(false, Y) → false
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__add(X1, X2) → add(X1, X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__and(true, X) → mark(X)
a__if(true, X, Y) → mark(X)
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
mark(true) → true
a__add(X1, X2) → add(X1, X2)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(a__add(x1, x2)) = 2 + x1 + 2·x2   
POL(a__and(x1, x2)) = x1 + 2·x2   
POL(a__first(x1, x2)) = 2·x1 + 2·x2   
POL(a__from(x1)) = 2·x1   
POL(a__if(x1, x2, x3)) = 2·x1 + 2·x2 + 2·x3   
POL(add(x1, x2)) = 1 + x1 + 2·x2   
POL(and(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(first(x1, x2)) = 2·x1 + 2·x2   
POL(from(x1)) = x1   
POL(if(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(mark(x1)) = 2·x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(true) = 2   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(false, Y) → false
a__if(false, X, Y) → mark(Y)
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__and(false, Y) → false
a__if(false, X, Y) → mark(Y)
a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
a__from(X) → cons(X, from(s(X)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(false) → false
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__and(false, Y) → false
a__if(false, X, Y) → mark(Y)
a__from(X) → cons(X, from(s(X)))
mark(add(X1, X2)) → a__add(mark(X1), X2)
mark(false) → false
mark(0) → 0
mark(nil) → nil
a__and(X1, X2) → and(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__from(X) → from(X)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 2   
POL(a__add(x1, x2)) = 2 + x1 + 2·x2   
POL(a__and(x1, x2)) = 2 + 2·x1 + x2   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = 2 + 2·x1   
POL(a__if(x1, x2, x3)) = 2 + x1 + 2·x2 + 2·x3   
POL(add(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(and(x1, x2)) = 1 + 2·x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(false) = 2   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(if(x1, x2, x3)) = 1 + x1 + 2·x2 + 2·x3   
POL(mark(x1)) = 2·x1   
POL(nil) = 2   
POL(s(x1)) = x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
QTRS
          ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(s(X)) → s(X)
mark(cons(X1, X2)) → cons(X1, X2)
a__first(X1, X2) → first(X1, X2)

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(X)
mark(s(X)) → s(X)
mark(cons(X1, X2)) → cons(X1, X2)
a__first(X1, X2) → first(X1, X2)

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(from(X)) → a__from(X)
mark(s(X)) → s(X)
mark(cons(X1, X2)) → cons(X1, X2)
a__first(X1, X2) → first(X1, X2)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 2   
POL(a__and(x1, x2)) = 2 + x1 + 2·x2   
POL(a__first(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(a__from(x1)) = 2 + 2·x1   
POL(a__if(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(and(x1, x2)) = 2 + x1 + 2·x2   
POL(cons(x1, x2)) = 1 + 2·x1 + x2   
POL(first(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(from(x1)) = 2 + x1   
POL(if(x1, x2, x3)) = 2 + 2·x1 + 2·x2 + 2·x3   
POL(mark(x1)) = 2·x1   
POL(nil) = 1   
POL(s(x1)) = 1 + x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
QTRS
              ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
Used ordering:
Polynomial interpretation [25]:

POL(a__first(x1, x2)) = 1 + x1 + x2   
POL(first(x1, x2)) = 2 + x1 + 2·x2   
POL(mark(x1)) = 2·x1   




↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ RRRPoloQTRSProof
        ↳ QTRS
          ↳ RRRPoloQTRSProof
            ↳ QTRS
              ↳ RRRPoloQTRSProof
QTRS
                  ↳ RisEmptyProof

Q restricted rewrite system:
R is empty.
Q is empty.

The TRS R is empty. Hence, termination is trivially proven.